package spil;

import desktop_resources.GUI;

public class Refuge extends Field {
	private int payment;
	public static final int START_POSITION = 1;
	public static final int HELLE_POSITION = 21;
	
	public Refuge(int payment, int fieldNumber) {
		super(fieldNumber);
		this.payment = payment;
	}
	
	public void landOnField(Player p) {
		if(p.getPosition() == START_POSITION) {
			p.getAccount().insert(payment);
			GUI.getUserButtonPressed(p + " får " + payment + " gratis", "ok");
		} else GUI.getUserButtonPressed("Helle", "ok");
	}
	
	public int getRent() {
		return payment;
	}
}
